package com.cmas.platform.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import com.aidex.common.core.domain.BasePlusEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

/**
 * 评论管理对象 comment
 * @author su
 * @email 1218819874@qq.com
 * @date 2023-03-15
 */
@Data
public class Comment extends BasePlusEntity
{
    private static final long serialVersionUID = 1L;

    /** 父级ID */
    @Excel(name = "父级ID")
    @LogField
    @FieldRemark(name = "父级ID",field = "pid")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String pid;

    /** 帖子ID */
    @Excel(name = "帖子ID")
    @LogField
    @FieldRemark(name = "帖子ID",field = "postId")
    @NotBlank(message = "帖子ID不允许为空")
    private String postId;

    /** 用户ID */
    @Excel(name = "用户ID")
    @LogField
    @FieldRemark(name = "用户ID",field = "userId")
    @NotBlank(message = "用户ID不允许为空")
    private String userId;


    /** 评论内容 */
    @Excel(name = "评论内容")
    @NotBlank(message = "评论内容不允许为空")
    @LogField
    @FieldRemark(name = "评论内容",field = "content")
    private String content;

    /** 是否有子节点 */
    @Excel(name = "是否有子节点")
    @LogField
    @FieldRemark(name = "是否有子节点",field = "isChild")
    private String isChild;

    /** 评论回复数 */
    @Excel(name = "评论回复数")
    @LogField
    @FieldRemark(name = "评论回复数",field = "replyNumber")
    private Integer replyNumber;

    /** 评论点赞数 */
    @Excel(name = "评论点赞数")
    @LogField
    @FieldRemark(name = "评论点赞数",field = "likeNumber")
    private Integer likeNumber;

    /** 评论举报数 */
    @Excel(name = "评论举报数")
    @LogField
    @FieldRemark(name = "评论举报数",field = "reportNumber")
    private Integer reportNumber;

    /** 评论状态 */
    @LogField
    @FieldRemark(name = "评论状态",field = "status")
    @TableField(value = "status", fill = FieldFill.INSERT)
    private String status;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("pid", getPid())
            .append("postId", getPostId())
            .append("content", getContent())
            .append("isChild", getIsChild())
            .append("replyNumber", getReplyNumber())
            .append("likeNumber", getLikeNumber())
            .append("reportNumber", getReportNumber())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
